<?php

namespace App\Http\Controllers;

use App\Repositories\Home\HomeFilter;
use App\Repositories\Home\HomeRepository;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;

class HomeController extends Controller
{
    public function clendError(HomeRepository $homeRepository, Request $request)
    {
        $yesterdayReport = $homeRepository->getClendError(new HomeFilter($request));
        return ['data' => $yesterdayReport];
    }

    public function attendance(HomeRepository $homeRepository, Request $request)
    {
        $attendance = $homeRepository->getAttendance(new HomeFilter($request));
        return ['data' => $attendance];
    }

    public function sevenTotal(HomeRepository $homeRepository, Request $request)
    {
        $attendance = $homeRepository->getSevenTotal(new HomeFilter($request));
        return ['data' => $attendance];
    }

    public function sevenTotalDepartment(HomeRepository $homeRepository, Request $request)
    {
        $attendance = $homeRepository->getSevenTotalDepartment(new HomeFilter($request));
        return ['data' => $attendance];
    }
}


